//
//  SubjectThreeLightCell.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/24.
//

#import "SubjectThreeLightCell.h"

@implementation SubjectThreeLightCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self CreateUI];
    }
    return self;
}
-(void)CreateUI{
    
    UIView *backV = [[UIView alloc]initWithFrame:CGRectMake(15, 0, 155, 170)];
    backV.backgroundColor = rgba(245, 245, 250, 1);
    backV.layer.cornerRadius = 8 ;
    [self addSubview:backV];

    
    UIImageView *circleimgv = [[UIImageView alloc]initWithFrame:CGRectMake(backV.frame.size.width/2-50/2, 20, 50, 50)];
    circleimgv.backgroundColor = [UIColor greenColor];
    circleimgv.image = [UIImage imageNamed:@""];
    circleimgv.layer.cornerRadius = 50/2;
    circleimgv.userInteractionEnabled = YES;
    [backV addSubview:circleimgv];

    UILabel *typeLab = [[UILabel alloc]initWithFrame:CGRectMake(0,  circleimgv.frame.size.height + circleimgv.frame.origin.y+15, backV.width, 20)];
    typeLab.text = @"新灯光1";
    typeLab.textColor = rgba(51, 51, 51, 1);
    typeLab.layer.backgroundColor = rgba(245, 245, 250, 1).CGColor;
    typeLab.textAlignment = 1;
    typeLab.layer.cornerRadius = 10;
    typeLab.font = [UIFont boldSystemFontOfSize:14];
    [backV addSubview:typeLab];
    
    
    UIButton *bfBtn = [[UIButton alloc]initWithFrame:CGRectMake(backV.width/2-80/2, typeLab.height + typeLab.y +15, 80, 35)];
    [bfBtn setTitle:@"播放" forState:0];
    [bfBtn setBackgroundColor:rgba(38, 194, 126, 1)];
    bfBtn.contentHorizontalAlignment = 0;
    [bfBtn setTitleColor:[UIColor whiteColor] forState:0];
    bfBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    bfBtn.layer.cornerRadius = 35/2;
    [backV addSubview:bfBtn];
    
    
}



@end
